<?php

namespace App\Admin\Actions\Post;

use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;
use Redis;

class productSKUList extends RowAction
{
    public $product_id;
    public $name = '查看SKU';

    public function __construct($productid)
    {
        $this->product_id = $productid;
    }

    public function href()
    {
        Redis::select(1);
        $redisField = 'product_id';
        Redis::set($redisField, $this->product_id);

        return "/admin/product_sku?&product_id=" . $this->product_id;
    }

}